#ifndef BOOKVIEW_H
#define BOOKVIEW_H

#include <QtGui/QWidget>
#include <QGridLayout>
#include <QUrl>
#include <QPrinter>
#include <QVector>
#include "bookpage.h"
#include "bookdata.h"
#include "txtbookdatabuilder.h"
#include "abstractview.h"

namespace Ui {
    class BookView;
}

class BookView : public AbstractView {
    Q_OBJECT
public:
    BookView(QWidget *parent = 0);
    ~BookView();
    virtual void preview();
    virtual void load(const QString &url);
    virtual void show(int index);
    virtual void showNext();
    virtual void showPrevious();
protected:
    void changeEvent(QEvent *e);

private:
    Ui::BookView *m_ui;
    BookPage *pageLeft;
    BookPage *pageRight;
    QGridLayout *mainLayout;
    BookData* bookData;
    int index;
};

#endif // BOOKVIEW_H
